package com.csc.finalproject.domain;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="states")

public class State implements Serializable{
/*
 * attribute
 */
	@Id
	@Column
	private int stateId;
	@Column
	private String stateName;
	
	@OneToMany(mappedBy="state")
	private List<AccountInfo> accountInfos;
	public List<AccountInfo> getAccountInfos() {
		return accountInfos;
	}
	public void setAccountInfos(List<AccountInfo> accountInfos) {
		this.accountInfos = accountInfos;
	}
	/*
	 * contructor
	 */
	public State() {
		
	}
	public State(String stateName) {
		
		this.stateName = stateName;
	}
	/*
	 * getter/setter
	 */
	public int getStateId() {
		return stateId;
	}
	public void setStateId(int stateId) {
		this.stateId = stateId;
	}
	public String getStateName() {
		return stateName;
	}
	public void setStateName(String stateName) {
		this.stateName = stateName;
	}
	
	
}
